import Vue from 'vue'
import VueRouter from 'vue-router'

import NewHome from '../views/NewHome.vue'
// import MovieHome from '../views/MovieHome.vue'
// import MineHome from '../views/MineHome.vue'
// import DuanShi from '../views/DuanShi.vue'
import SheHui from '@/components/SheHui.vue'

Vue.use(VueRouter)

const routes = [
	{
		path: '/newhome',
		name: 'newhome',
		component: NewHome,
		children:[
			{
				path: 'shehui',
				name: 'shehui',
				component : SheHui
			},
			{
				path: 'guonei',
				name: 'guonei',
				component : () => import('@/components/GuoNei.vue')
			},
			{
				path: 'junshi',
				name: 'junshi',
				component : () => import('@/components/JunShi.vue')
			},
			{
				path: 'yule',
				name: 'yule',
				component : () => import('@/components/YuLe.vue')
			},
			{
				path: 'keji',
				name: 'keji',
				component : () => import('@/components/KeJi.vue')
			},
			{
				path: 'caijin',
				name: 'caijin',
				component : () => import('@/components/CaiJin.vue')
			},
			{
				path: 'shisheng',
				name: 'shisheng',
				component : () => import('@/components/ShiSheng.vue')
			},
			
		]
	},
	{
		path: '/minehome',
		name: 'minehome',
		component: () => import('../views/MineHome.vue')
	},
	{
		path: '/moviehome',
		name: 'moviehome',
		component: () => import('../views/MovieHome.vue'),
		children:[
			{
				path: 'day',
				name: 'day',
				component: () => import('@/components/Day.vue')
			},
			{
				path: 'month',
				name: 'month',
				component: () => import('@/components/Month.vue')
			},
			{
				path: 'year',
				name: 'year',
				component: () => import('@/components/Year.vue')
			}
		]
	},
	{
		path: '/duanshi',
		name: 'duanshi',
		component: () => import('../views/DuanShi.vue')
	},
	{
		path: '/*',
		redirect: '/newhome/caijin'
	}
	
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
